package com.services;

import com.bean.User;
import com.dao.userMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class UserServicesimpl implements UserServices{
    @Autowired
    private userMapper userMapper;

    public void setUserMapper(com.dao.userMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
    }

    @Override
    public void deleteUser(int iduser) {
        userMapper.deleteUser(iduser);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public User selectOneUser(int iduser) {
        return userMapper.selectOneUser(iduser);
    }

    @Override
    public List<User> selectAllUser() {
        return userMapper.selectAllUser();
    }
}
